//
//  gIrlfriend.swift
//  swift03
//
//  Created by 潘成城 on 2017/9/20.
//  Copyright © 2017年 潘成城. All rights reserved.
//

import Foundation

public class GirlFriend: NSObject{
    fileprivate var age: Int
    fileprivate var name: String
    
    override init() {
        name = String(format: "%c%c%c%c",
                      26 + Int(arc4random()%100) + 1,
                      26 + Int(arc4random()%100) + 1,
                      26 + Int(arc4random()%100) + 1,
                      26 + Int(arc4random()%100) + 1
        )
        age = Int( arc4random() % 10 + 16 )
    }
    
    public func yh() -> Void{
        print("约会：name is: \(name), age is: \(age)")
    }
    
    override public var description: String{
        get{
            return "约会：name is: \(name), age is: \(age)"
        }
    }
}
